package com.zz.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.zz.common.ESignParameter;
import com.zz.common.ZohoRecord;
import com.zz.service.EsignService;
import com.zz.utils.ESignApiUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Slf4j
@Service
public class EsignSrviceImpl implements EsignService {

    @Autowired
    ZohoRecord zohoRecord;

    @Autowired
    ESignParameter parameter;

    @Autowired
    IncentiveServiceImpl incentiveService;

    // 当前环境
    public static final String environment = ESignParameter.ENVIRONMENT;

    @Override
    public String getAccount(String accountId) {
        JSONObject accountByAccountId = ESignApiUtil.getAccountByAccountId(parameter, environment, accountId);
        System.out.println("accountByAccountId.toJSONString() = " + accountByAccountId.toJSONString());
        return accountByAccountId.toJSONString();
    }
}
